package com.hdoit.ares.logical.official.dao.impl;

import org.springframework.stereotype.Component;

import com.tennetcn.common.dao.base.IFinderExpression;
import com.tennetcn.common.dao.base.impl.SuperDao;
import com.tennetcn.common.utils.FinderExpressionFactory;
import com.hdoit.ares.logical.official.dao.IPraiseAndGlanceDao;
import com.hdoit.ares.logical.official.model.Artical;
import com.hdoit.ares.logical.official.model.PraiseAndGlance;
/**
 * @author      yujinhui
 * @email       
 * @createtime  2018年03月10日 15:41:46
 * @comment
 */
@Component
public class PraiseAndGlanceDaoImpl extends SuperDao<PraiseAndGlance> implements IPraiseAndGlanceDao{

	@Override
	public PraiseAndGlance queryModel(String receiveId, String type) {
		IFinderExpression finderExpression=FinderExpressionFactory.createExpression();
		
		finderExpression.select("*")
			            .from(PraiseAndGlance.class)
		 	            .andWhere("receiveId = #{receiveId}")
		 	            .setParam("receiveId", receiveId)
		 	            .andWhere("type = #{type}")
		 	            .setParam("type", type);
		 	            
		return queryModel(finderExpression);
	}

}